package 练习;

/**
 * @Author Mucd
 * @ClassName HuiWenShu
 * @Date 2020/12/12/012
 * @Specification Alibaba
 */
public class HuiWenShu {
    public static void main(String[] args) {
        int max = 100000;
        for (int i = 10000; i < max; i++) {
            //获取指定位数
            int ge = i % 10;
            int shi = i / 10 % 10;
            int tian = i / 1000 % 10;
            int wan = i / 1000 % 10;

            if ((ge == wan) && (shi == tian)) {
                System.out.println("回文数: " + i);
            }
        }
    }
}
